package com.akjava.akjbetas.vocaloid;

import jp.sourceforge.akjrcp.akj_betas.Akj_betasPlugin;
import jp.sourceforge.akjrcp.akj_betas.Messages;
import jp.sourceforge.akjrcp.dropsomething2.FFMpegDropSomethingTab2;
import jp.sourceforge.akjrcp.ui.GenericParameters;
import jp.sourceforge.akjrcp.ui.GenericParametersEditorDialog;
import jp.sourceforge.akjrcp.ui.GenericParametersFieldEditor;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.akjava.vocaloidtools.wavtovsq.VoiceSettingList;

public class VoiceSettingPage extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage {
	public static final String PREFERENCE_KEY="vocaloid_voice";
	public static final String EXPORT_VOICE_SETTINGS=PREFERENCE_KEY+"."+FFMpegDropSomethingTab2.SETTINGS;
	public static final String EXPORT_VOICE_SETTINGS_INDEX=PREFERENCE_KEY+"."+FFMpegDropSomethingTab2.SELECTION_INDEX;

	public VoiceSettingPage() {
		super(GRID);
		setPreferenceStore(Akj_betasPlugin.getDefault().getPreferenceStore());
		//setDescription(Messages.getString("pspsetting.description")); //$NON-NLS-1$
		initializeDefaults();
	}
	
	private void initializeDefaults() {
		
		// no one call it before open them

	}

	protected void createFieldEditors() {
		GenericParametersFieldEditor parametersEditor=new GenericParametersFieldEditor(EXPORT_VOICE_SETTINGS,Messages.getString("vocaloid.voice_settings"),getFieldEditorParent()){	
			protected GenericParameters createNewGenericParameters(
					GenericParametersEditorDialog dialog) {
				return VoiceSettingList.newGenericParameters();
			}
		};
		
		//no edit
		//parametersEditor.setOptionEditorClass(PSPOptionEditor.class);// i don know this is smart or not
		parametersEditor.setDialogWidth(720);
		parametersEditor.setDialogHeight(640);
		addField(parametersEditor);
		adjustGridLayout();
	}

	public void init(IWorkbench workbench) {
		
	}

}
